package com.amc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.amc.dao.IFoodDao;
import com.amc.dto.FoodView;
import com.amc.entity.FoodType;
import com.amc.service.IFoodService;


@Service(value="foodService")
public class FoodServiceImpl implements IFoodService {
	
	private IFoodDao dao;

	@Resource
	public void setDao(IFoodDao dao) {
		this.dao = dao;
	}
	
	@Override
	@Transactional
	public List<FoodView> queryFoodByKeyWord(String keyWord) {
		return dao.queryFoodByKeyWord(keyWord);
	}

	@Override
	@Transactional
	public List<FoodType> queryFoodTypeByMId(String mId) {
		return dao.queryFoodTypeByMId(mId);
	}

	@Override
	@Transactional
	public List<FoodView> queryFoodByFoodType(String mId, String tId) {
		return dao.queryFoodByFoodType(mId, tId);
	}

	@Override
	@Transactional
	public List<FoodView> queryFoodByMId(String mId) {
		return dao.queryFoodByMId(mId);
	}

	@Override
	@Transactional
	public FoodView queryFood(String foodId) {
		return dao.queryFood(foodId);
	}



}
